package com.itheima.mapper;

import com.itheima.entity.pojo.Dish;
import com.itheima.entity.vo.dish.DishByIdVo;
import com.itheima.entity.vo.dish.DishListByCategoryVo;
import com.itheima.entity.vo.dish.DishListVo;
import com.itheima.entity.vo.dish.DishPageLVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author huangzelnag
 * @create 2022-05-09
 */
@Mapper
public interface DishMapper {

        List<DishPageLVo> selectPage(String name, Integer page, Integer pageSize);

        Integer selectNameLikeCount(String name);


        Integer insert(Dish dish);


        Dish selectByName(String name);

        Integer  deleteForce(String id);


        DishByIdVo selectById(String id);


        Integer deleteById(@Param("ids") String[] ids );

        Boolean update(Dish dish);


        Boolean upState(Integer status, @Param("ids") String[] ids);



        List<DishListByCategoryVo> selectByCategoryId(String CategoryId);



        List<DishListVo> selectList(String categoryId, String status);



}
